package com.itheima.web.controller;

import com.itheima.entity.Node;
import com.itheima.entity.dto.NodeDto;
import com.itheima.entity.vo.PageVo;
import com.itheima.service.NodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/vm-service/node/search")
public class NodeController {
    @Autowired
    NodeService nodeService;

    /**
     * 商品类型分页查询
     * @param pageIndex
     * @param pageSize
     * @param regionId
     * @return
     */
    @GetMapping
    public PageVo<Node> seleBypage(Long pageIndex, Long pageSize, Long regionId) {
        return nodeService.seleteByPage(pageIndex, pageSize, regionId);
    }
   // @GetMapping
    public NodeDto<Node> SelectNodePage( NodeDto nodeDto){
    return nodeService.selectPage(nodeDto);
    }

}
